package org.example.enums;

import org.example.Interface.DBi;

import org.example.Interface.db.DB2DDl;
import org.example.Interface.db.MysqlDDl;
import org.example.Interface.db.OracleDDl;
import org.example.Interface.db.PostgreSQLDDI;
import org.example.Interface.base.Base;

import java.util.function.Supplier;

public enum DbTypeEnum {
    DB2(DB2DDl::new),

    MYSQL(MysqlDDl::new),

    ORAClE(OracleDDl::new),

    POSTGRESQL(PostgreSQLDDI::new);




    private final DBi db;





    DbTypeEnum( final Supplier<DBi> supplier) {
        this.db = supplier.get();
    }

    public DBi getDb() {
        return db;
    }

    public Base getDbBase(){
        return (Base) db;
    }





}
